package net.kaaass.tools.gradequery.network;

import java.io.FileWriter;
import java.io.IOException;

import java.io.File;

/**
 * Created by guyis_000 on 2017/4/28.
 */
public class CrazyGet {
    public static void get(String id, String eId) throws IOException {
        String data = "";
        while (true) {
            try {
                data = Query.queryRawData(id, eId);
            } catch (Exception e) {
                continue;
            }
            System.out.println(data);
            break;
        }
        File f = new File("疯狂查询结果.html");
        if (f.exists())
            f.delete();
        FileWriter fileWriter = new FileWriter(f);
        fileWriter.write(data);
        fileWriter.flush();
        fileWriter.close();
    }
}
